<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <meta http-equiv="X-UA-Compatible" content="IE=edge" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>Document</title>
  </head>
  <body>
    <!-- 1. 先准备一个容器 -->
    <div id="app">
      <!-- 属性如果值是data中的变量动态绑定的，不能用插值表达式 要用一个v-bind来进行属性动态绑定 -->
      <a v-bind:href="link">百度一下</a>
      <img v-bind:src="link1" alt="" />
      <hr />
      <a :href="link">百度一下</a>
      <img :src="link1" alt="" />
    </div>
    <!-- 2. 引框架 -->
    <script src="./vue.js"></script>
    <script>
      // 3.初始化vue实例对象
      const vm = new Vue({
        el: "#app",
        data: {
          link: "https://www.baidu.com/",
          link1: "./imgs/10-01.png",
        },
      });
    </script>
  </body>
</html>
